import { isActiveEnum } from './common';
import { File } from './file';
import { Category } from './category';

export interface Menu {
  id: string;
  name: string;
  icon?: string;
  path: string;
  order: number;
  isActive: isActiveEnum;
  parentId?: string;
  createdAt: string;
  updatedAt: string;
  children?: Menu[];
  categories?: Category[];
  iconFile?: File;
  iconFileId?: string;
  sysCode?: string;
}

export interface CreateMenuRequest {
  name: string;
  path: string;
  order: number;
  isActive: boolean;
  parentId?: string;
  iconFileId: string;
  sysCode?: string;
}

export interface UpdateMenuRequest extends CreateMenuRequest {
  id: string;
}

export interface MenuListParams {
  current?: number;
  pageSize?: number;
  name?: string;
  path?: string;
  sysCode?: string;
  isActive?: isActiveEnum;
}

export interface MenuDetailParams {
  id: string;
}

export interface DeleteMenuParams {
  id: string;
}